<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: mets::simulated_annealing&lt; move_manager_type &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classmets_1_1simulated__annealing.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="classmets_1_1simulated__annealing-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">mets::simulated_annealing&lt; move_manager_type &gt; 模板类 参考<div class="ingroups"><a class="el" href="group__simulated__annealing.html">Simulated Annealing</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Search by Simulated Annealing.  
 <a href="classmets_1_1simulated__annealing.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="simulated-annealing_8hh_source.html">simulated-annealing.hh</a>&gt;</code></p>
<div class="dynheader">
类 mets::simulated_annealing&lt; move_manager_type &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classmets_1_1simulated__annealing.png" usemap="#mets::simulated_5Fannealing_3C_20move_5Fmanager_5Ftype_20_3E_map" alt=""/>
  <map id="mets::simulated_5Fannealing_3C_20move_5Fmanager_5Ftype_20_3E_map" name="mets::simulated_5Fannealing_3C_20move_5Fmanager_5Ftype_20_3E_map">
<area href="classmets_1_1abstract__search.html" title="An abstract search." alt="mets::abstract_search&lt; move_manager_type &gt;" shape="rect" coords="0,56,339,80"/>
<area href="classmets_1_1subject.html" alt="mets::subject&lt; abstract_search&lt; move_manager_type &gt; &gt;" shape="rect" coords="0,0,339,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a35cdb6da4121c9ceef05c656a4b8d476"><td class="memItemLeft" align="right" valign="top"><a id="a35cdb6da4121c9ceef05c656a4b8d476"></a>
typedef <a class="el" href="classmets_1_1simulated__annealing.html">simulated_annealing</a>&lt; move_manager_type &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>search_type</b></td></tr>
<tr class="separator:a35cdb6da4121c9ceef05c656a4b8d476"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classmets_1_1abstract__search"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classmets_1_1abstract__search')"><img src="closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="classmets_1_1abstract__search.html">mets::abstract_search&lt; move_manager_type &gt;</a></td></tr>
<tr class="memitem:add8e7e7b063145361775a3b3280a7f13 inherit pub_types_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br />
&#160;&#160;<a class="el" href="classmets_1_1abstract__search.html#add8e7e7b063145361775a3b3280a7f13a97ca1cddb103101df3f5efd6afa909a3">MOVE_MADE</a> = 0
, <a class="el" href="classmets_1_1abstract__search.html#add8e7e7b063145361775a3b3280a7f13a097dfcc9c9fd4a57815225d689ccd65b">IMPROVEMENT_MADE</a>
, <a class="el" href="classmets_1_1abstract__search.html#add8e7e7b063145361775a3b3280a7f13a89508708b3905bfddc4dc4099cfb5eff">ITERATION_BEGIN</a>
, <a class="el" href="classmets_1_1abstract__search.html#add8e7e7b063145361775a3b3280a7f13a1f828a6d9da2b4b791e4467402690a02">ITERATION_END</a>
, <br />
&#160;&#160;<a class="el" href="classmets_1_1abstract__search.html#add8e7e7b063145361775a3b3280a7f13a76e99386020b09218bc569b6c597548d">LAST</a>
<br />
 }</td></tr>
<tr class="separator:add8e7e7b063145361775a3b3280a7f13 inherit pub_types_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ac4f39a10bde417c05b815b04b741f796"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simulated__annealing.html#ac4f39a10bde417c05b815b04b741f796">simulated_annealing</a> (<a class="el" href="classmets_1_1evaluable__solution.html">evaluable_solution</a> &amp;starting_point, <a class="el" href="classmets_1_1solution__recorder.html">solution_recorder</a> &amp;<a class="el" href="classmets_1_1abstract__search.html#ac2a0764914a1be2c4e06b9120c9fa7bd">recorder</a>, move_manager_type &amp;moveman, <a class="el" href="classmets_1_1termination__criteria__chain.html">termination_criteria_chain</a> &amp;tc, <a class="el" href="classmets_1_1abstract__cooling__schedule.html">abstract_cooling_schedule</a> &amp;cs, double starting_temp, double stop_temp=1e-7, double K=1.0)</td></tr>
<tr class="memdesc:ac4f39a10bde417c05b815b04b741f796"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a search by simulated annealing instance.  <a href="classmets_1_1simulated__annealing.html#ac4f39a10bde417c05b815b04b741f796">更多...</a><br /></td></tr>
<tr class="separator:ac4f39a10bde417c05b815b04b741f796"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa39ceb672cb3a4ca38551be26770788d"><td class="memItemLeft" align="right" valign="top"><a id="aa39ceb672cb3a4ca38551be26770788d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simulated__annealing.html#aa39ceb672cb3a4ca38551be26770788d">simulated_annealing</a> (const <a class="el" href="classmets_1_1simulated__annealing.html">simulated_annealing</a> &amp;)</td></tr>
<tr class="memdesc:aa39ceb672cb3a4ca38551be26770788d"><td class="mdescLeft">&#160;</td><td class="mdescRight">purposely not implemented (see Effective C++) <br /></td></tr>
<tr class="separator:aa39ceb672cb3a4ca38551be26770788d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0458a4a7f91d140cd05c6fa9b439a90b"><td class="memItemLeft" align="right" valign="top"><a id="a0458a4a7f91d140cd05c6fa9b439a90b"></a>
<a class="el" href="classmets_1_1simulated__annealing.html">simulated_annealing</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classmets_1_1simulated__annealing.html">simulated_annealing</a> &amp;)</td></tr>
<tr class="separator:a0458a4a7f91d140cd05c6fa9b439a90b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8303c4604e82f142cb888b02ba32048"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simulated__annealing.html#ac8303c4604e82f142cb888b02ba32048">search</a> ()  throw (no_moves_error)</td></tr>
<tr class="memdesc:ac8303c4604e82f142cb888b02ba32048"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method starts the simulated annealing search process.  <a href="classmets_1_1simulated__annealing.html#ac8303c4604e82f142cb888b02ba32048">更多...</a><br /></td></tr>
<tr class="separator:ac8303c4604e82f142cb888b02ba32048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a729c5bb36255f99e2d6949b599422ad5"><td class="memItemLeft" align="right" valign="top"><a id="a729c5bb36255f99e2d6949b599422ad5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setApplyAndEvaluate</b> (bool b)</td></tr>
<tr class="separator:a729c5bb36255f99e2d6949b599422ad5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5be9072d06636f667c6362760367682a"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simulated__annealing.html#a5be9072d06636f667c6362760367682a">current_temp</a> () const</td></tr>
<tr class="memdesc:a5be9072d06636f667c6362760367682a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The current annealing temperature.  <a href="classmets_1_1simulated__annealing.html#a5be9072d06636f667c6362760367682a">更多...</a><br /></td></tr>
<tr class="separator:a5be9072d06636f667c6362760367682a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3af70d63721cfb2a847c4e211283db06"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classmets_1_1abstract__cooling__schedule.html">abstract_cooling_schedule</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simulated__annealing.html#a3af70d63721cfb2a847c4e211283db06">cooling_schedule</a> () const</td></tr>
<tr class="memdesc:a3af70d63721cfb2a847c4e211283db06"><td class="mdescLeft">&#160;</td><td class="mdescRight">The annealing schedule instance.  <a href="classmets_1_1simulated__annealing.html#a3af70d63721cfb2a847c4e211283db06">更多...</a><br /></td></tr>
<tr class="separator:a3af70d63721cfb2a847c4e211283db06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classmets_1_1abstract__search"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classmets_1_1abstract__search')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classmets_1_1abstract__search.html">mets::abstract_search&lt; move_manager_type &gt;</a></td></tr>
<tr class="memitem:ac8b0d53e92a4c7510f28d35a8d0153dd inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#ac8b0d53e92a4c7510f28d35a8d0153dd">abstract_search</a> (<a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;<a class="el" href="classmets_1_1abstract__search.html#a81d584dbf1eaf56dc5e122a16abedf7d">working</a>, <a class="el" href="classmets_1_1solution__recorder.html">solution_recorder</a> &amp;<a class="el" href="classmets_1_1abstract__search.html#ac2a0764914a1be2c4e06b9120c9fa7bd">recorder</a>, move_manager_type &amp;moveman)</td></tr>
<tr class="memdesc:ac8b0d53e92a4c7510f28d35a8d0153dd inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set some common values needed for neighborhood based metaheuristics.  <a href="classmets_1_1abstract__search.html#ac8b0d53e92a4c7510f28d35a8d0153dd">更多...</a><br /></td></tr>
<tr class="separator:ac8b0d53e92a4c7510f28d35a8d0153dd inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8754f00b5cbd58f4dfb28120d5d7f9f2 inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a8754f00b5cbd58f4dfb28120d5d7f9f2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#a8754f00b5cbd58f4dfb28120d5d7f9f2">abstract_search</a> (const <a class="el" href="classmets_1_1abstract__search.html">abstract_search</a>&lt; move_manager_type &gt; &amp;)</td></tr>
<tr class="memdesc:a8754f00b5cbd58f4dfb28120d5d7f9f2 inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">purposely not implemented (see Effective C++) <br /></td></tr>
<tr class="separator:a8754f00b5cbd58f4dfb28120d5d7f9f2 inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa70d0d3f2c80939734aef1c38464fb0f inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="aa70d0d3f2c80939734aef1c38464fb0f"></a>
<a class="el" href="classmets_1_1abstract__search.html">abstract_search</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#aa70d0d3f2c80939734aef1c38464fb0f">operator==</a> (const <a class="el" href="classmets_1_1abstract__search.html">abstract_search</a>&lt; move_manager_type &gt; &amp;)</td></tr>
<tr class="memdesc:aa70d0d3f2c80939734aef1c38464fb0f inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">purposely not implemented (see Effective C++) <br /></td></tr>
<tr class="separator:aa70d0d3f2c80939734aef1c38464fb0f inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eb628da5c538bbe2551de7067bde94f inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a7eb628da5c538bbe2551de7067bde94f"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#a7eb628da5c538bbe2551de7067bde94f">~abstract_search</a> ()</td></tr>
<tr class="memdesc:a7eb628da5c538bbe2551de7067bde94f inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor. <br /></td></tr>
<tr class="separator:a7eb628da5c538bbe2551de7067bde94f inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2a0764914a1be2c4e06b9120c9fa7bd inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="ac2a0764914a1be2c4e06b9120c9fa7bd"></a>
const <a class="el" href="classmets_1_1solution__recorder.html">solution_recorder</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#ac2a0764914a1be2c4e06b9120c9fa7bd">recorder</a> () const</td></tr>
<tr class="memdesc:ac2a0764914a1be2c4e06b9120c9fa7bd inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">The solution recorder instance. <br /></td></tr>
<tr class="separator:ac2a0764914a1be2c4e06b9120c9fa7bd inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81d584dbf1eaf56dc5e122a16abedf7d inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a81d584dbf1eaf56dc5e122a16abedf7d"></a>
const <a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#a81d584dbf1eaf56dc5e122a16abedf7d">working</a> () const</td></tr>
<tr class="memdesc:a81d584dbf1eaf56dc5e122a16abedf7d inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">The current working solution. <br /></td></tr>
<tr class="separator:a81d584dbf1eaf56dc5e122a16abedf7d inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5af44f66b46c50a7eb984fa48a413a3 inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="ab5af44f66b46c50a7eb984fa48a413a3"></a>
<a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>working</b> ()</td></tr>
<tr class="separator:ab5af44f66b46c50a7eb984fa48a413a3 inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acadceab7cdd6c7e6bfc108acb56f3831 inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="acadceab7cdd6c7e6bfc108acb56f3831"></a>
const <a class="el" href="classmets_1_1move.html">move</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#acadceab7cdd6c7e6bfc108acb56f3831">current_move</a> () const</td></tr>
<tr class="memdesc:acadceab7cdd6c7e6bfc108acb56f3831 inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">The last move made <br /></td></tr>
<tr class="separator:acadceab7cdd6c7e6bfc108acb56f3831 inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3344b3a27baf680da3d084aa5916374 inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="ab3344b3a27baf680da3d084aa5916374"></a>
<a class="el" href="classmets_1_1move.html">move</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#ab3344b3a27baf680da3d084aa5916374">current_move</a> ()</td></tr>
<tr class="memdesc:ab3344b3a27baf680da3d084aa5916374 inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">The last move made <br /></td></tr>
<tr class="separator:ab3344b3a27baf680da3d084aa5916374 inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabfba800289490b7b6d10f49c60761af inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="aabfba800289490b7b6d10f49c60761af"></a>
const move_manager_type &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#aabfba800289490b7b6d10f49c60761af">move_manager</a> () const</td></tr>
<tr class="memdesc:aabfba800289490b7b6d10f49c60761af inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">The move manager used by this search <br /></td></tr>
<tr class="separator:aabfba800289490b7b6d10f49c60761af inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c11083e68c7c1f3cad2db072cb3b29 inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a45c11083e68c7c1f3cad2db072cb3b29"></a>
move_manager_type &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#a45c11083e68c7c1f3cad2db072cb3b29">move_manager</a> ()</td></tr>
<tr class="memdesc:a45c11083e68c7c1f3cad2db072cb3b29 inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">The move manager used by this search <br /></td></tr>
<tr class="separator:a45c11083e68c7c1f3cad2db072cb3b29 inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34d5a51aa2185952505cf9c22b2bbc68 inherit pub_methods_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1abstract__search.html#a34d5a51aa2185952505cf9c22b2bbc68">step</a> () const</td></tr>
<tr class="memdesc:a34d5a51aa2185952505cf9c22b2bbc68 inherit pub_methods_classmets_1_1abstract__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">The current step of the algorithm (to be used by the observers).  <a href="classmets_1_1abstract__search.html#a34d5a51aa2185952505cf9c22b2bbc68">更多...</a><br /></td></tr>
<tr class="separator:a34d5a51aa2185952505cf9c22b2bbc68 inherit pub_methods_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classmets_1_1subject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classmets_1_1subject')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classmets_1_1subject.html">mets::subject&lt; abstract_search&lt; move_manager_type &gt; &gt;</a></td></tr>
<tr class="memitem:a580c481db07f883261c0a24f0f201067 inherit pub_methods_classmets_1_1subject"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1subject.html#a580c481db07f883261c0a24f0f201067">attach</a> (<a class="el" href="classmets_1_1observer.html">observer</a>&lt; <a class="el" href="classmets_1_1abstract__search.html">abstract_search</a>&lt; move_manager_type &gt; &gt; &amp;o)</td></tr>
<tr class="memdesc:a580c481db07f883261c0a24f0f201067 inherit pub_methods_classmets_1_1subject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a new observer to this subject.  <a href="classmets_1_1subject.html#a580c481db07f883261c0a24f0f201067">更多...</a><br /></td></tr>
<tr class="separator:a580c481db07f883261c0a24f0f201067 inherit pub_methods_classmets_1_1subject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6b5055d74cb5671e46bb57a4109cf3a inherit pub_methods_classmets_1_1subject"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1subject.html#af6b5055d74cb5671e46bb57a4109cf3a">detach</a> (<a class="el" href="classmets_1_1observer.html">observer</a>&lt; <a class="el" href="classmets_1_1abstract__search.html">abstract_search</a>&lt; move_manager_type &gt; &gt; &amp;o)</td></tr>
<tr class="memdesc:af6b5055d74cb5671e46bb57a4109cf3a inherit pub_methods_classmets_1_1subject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detach a new observer to this subject.  <a href="classmets_1_1subject.html#af6b5055d74cb5671e46bb57a4109cf3a">更多...</a><br /></td></tr>
<tr class="separator:af6b5055d74cb5671e46bb57a4109cf3a inherit pub_methods_classmets_1_1subject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a604a3c6cb19a470779170e29528f3e83 inherit pub_methods_classmets_1_1subject"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1subject.html#a604a3c6cb19a470779170e29528f3e83">notify</a> ()</td></tr>
<tr class="memdesc:a604a3c6cb19a470779170e29528f3e83 inherit pub_methods_classmets_1_1subject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify all attached observers.  <a href="classmets_1_1subject.html#a604a3c6cb19a470779170e29528f3e83">更多...</a><br /></td></tr>
<tr class="separator:a604a3c6cb19a470779170e29528f3e83 inherit pub_methods_classmets_1_1subject"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:aea6f7cac85fb9e8a349524b15196763e"><td class="memItemLeft" align="right" valign="top"><a id="aea6f7cac85fb9e8a349524b15196763e"></a>
<a class="el" href="classmets_1_1termination__criteria__chain.html">termination_criteria_chain</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>termination_criteria_m</b></td></tr>
<tr class="separator:aea6f7cac85fb9e8a349524b15196763e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae241e04e2263a89abe1295ec9e80f8f5"><td class="memItemLeft" align="right" valign="top"><a id="ae241e04e2263a89abe1295ec9e80f8f5"></a>
<a class="el" href="classmets_1_1abstract__cooling__schedule.html">abstract_cooling_schedule</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>cooling_schedule_m</b></td></tr>
<tr class="separator:ae241e04e2263a89abe1295ec9e80f8f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c02f5e9d5d1df37c815049f69c3d3c4"><td class="memItemLeft" align="right" valign="top"><a id="a8c02f5e9d5d1df37c815049f69c3d3c4"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>starting_temp_m</b></td></tr>
<tr class="separator:a8c02f5e9d5d1df37c815049f69c3d3c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eeaf5dcbd76993f63d32957acd1ca76"><td class="memItemLeft" align="right" valign="top"><a id="a7eeaf5dcbd76993f63d32957acd1ca76"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>stop_temp_m</b></td></tr>
<tr class="separator:a7eeaf5dcbd76993f63d32957acd1ca76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa23862f401055f51a9f516b9292be189"><td class="memItemLeft" align="right" valign="top"><a id="aa23862f401055f51a9f516b9292be189"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>current_temp_m</b></td></tr>
<tr class="separator:aa23862f401055f51a9f516b9292be189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2c9473e87d1a48546ec668579ece874"><td class="memItemLeft" align="right" valign="top"><a id="af2c9473e87d1a48546ec668579ece874"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>K_m</b></td></tr>
<tr class="separator:af2c9473e87d1a48546ec668579ece874"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a323da93dd71b54ef142403d0457d568c"><td class="memItemLeft" align="right" valign="top"><a id="a323da93dd71b54ef142403d0457d568c"></a>
std::tr1::uniform_real&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ureal</b></td></tr>
<tr class="separator:a323da93dd71b54ef142403d0457d568c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b6624e03afad9d4c3db88fc6bd90ea8"><td class="memItemLeft" align="right" valign="top"><a id="a8b6624e03afad9d4c3db88fc6bd90ea8"></a>
std::tr1::mt19937&#160;</td><td class="memItemRight" valign="bottom"><b>rng</b></td></tr>
<tr class="separator:a8b6624e03afad9d4c3db88fc6bd90ea8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38ecb6b798ed7359af1ef1996240e017"><td class="memItemLeft" align="right" valign="top"><a id="a38ecb6b798ed7359af1ef1996240e017"></a>
std::tr1::variate_generator&lt; std::tr1::mt19937, std::tr1::uniform_real&lt; double &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>gen</b></td></tr>
<tr class="separator:a38ecb6b798ed7359af1ef1996240e017"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac90093524b6768e74374938ced2d82ab"><td class="memItemLeft" align="right" valign="top"><a id="ac90093524b6768e74374938ced2d82ab"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>apply_and_evaluate</b></td></tr>
<tr class="separator:ac90093524b6768e74374938ced2d82ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classmets_1_1abstract__search"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classmets_1_1abstract__search')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="classmets_1_1abstract__search.html">mets::abstract_search&lt; move_manager_type &gt;</a></td></tr>
<tr class="memitem:a0e83fc9a38ebb0e43a01e39a9f355571 inherit pro_attribs_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a0e83fc9a38ebb0e43a01e39a9f355571"></a>
<a class="el" href="classmets_1_1solution__recorder.html">solution_recorder</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>solution_recorder_m</b></td></tr>
<tr class="separator:a0e83fc9a38ebb0e43a01e39a9f355571 inherit pro_attribs_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c4dca8f8eb5c44b6a82850a1c2877c6 inherit pro_attribs_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a5c4dca8f8eb5c44b6a82850a1c2877c6"></a>
<a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>working_solution_m</b></td></tr>
<tr class="separator:a5c4dca8f8eb5c44b6a82850a1c2877c6 inherit pro_attribs_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21b7cc1546cea204ec302745a2414d3b inherit pro_attribs_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a21b7cc1546cea204ec302745a2414d3b"></a>
move_manager_type &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>moves_m</b></td></tr>
<tr class="separator:a21b7cc1546cea204ec302745a2414d3b inherit pro_attribs_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a030ba3ca63ea155fc4f70972b1134560 inherit pro_attribs_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="a030ba3ca63ea155fc4f70972b1134560"></a>
move_manager_type::iterator&#160;</td><td class="memItemRight" valign="bottom"><b>current_move_m</b></td></tr>
<tr class="separator:a030ba3ca63ea155fc4f70972b1134560 inherit pro_attribs_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac30e04104d2803c16bfc5ff905ec9d55 inherit pro_attribs_classmets_1_1abstract__search"><td class="memItemLeft" align="right" valign="top"><a id="ac30e04104d2803c16bfc5ff905ec9d55"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>step_m</b></td></tr>
<tr class="separator:ac30e04104d2803c16bfc5ff905ec9d55 inherit pro_attribs_classmets_1_1abstract__search"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classmets_1_1subject"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classmets_1_1subject')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="classmets_1_1subject.html">mets::subject&lt; abstract_search&lt; move_manager_type &gt; &gt;</a></td></tr>
<tr class="memitem:a01924f78859ce56ff0448030e81166e0 inherit pro_attribs_classmets_1_1subject"><td class="memItemLeft" align="right" valign="top"><a id="a01924f78859ce56ff0448030e81166e0"></a>
std::set&lt; <a class="el" href="classmets_1_1observer.html">observer</a>&lt; <a class="el" href="classmets_1_1abstract__search.html">abstract_search</a>&lt; move_manager_type &gt; &gt; * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>observers_m</b></td></tr>
<tr class="separator:a01924f78859ce56ff0448030e81166e0 inherit pro_attribs_classmets_1_1subject"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename move_manager_type&gt;<br />
class mets::simulated_annealing&lt; move_manager_type &gt;</h3>

<p>Search by Simulated Annealing. </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ac4f39a10bde417c05b815b04b741f796"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4f39a10bde417c05b815b04b741f796">&#9670;&nbsp;</a></span>simulated_annealing()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename move_manager_type &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classmets_1_1simulated__annealing.html">mets::simulated_annealing</a>&lt; move_manager_type &gt;::<a class="el" href="classmets_1_1simulated__annealing.html">simulated_annealing</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmets_1_1evaluable__solution.html">evaluable_solution</a> &amp;&#160;</td>
          <td class="paramname"><em>starting_point</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmets_1_1solution__recorder.html">solution_recorder</a> &amp;&#160;</td>
          <td class="paramname"><em>recorder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">move_manager_type &amp;&#160;</td>
          <td class="paramname"><em>moveman</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmets_1_1termination__criteria__chain.html">termination_criteria_chain</a> &amp;&#160;</td>
          <td class="paramname"><em>tc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmets_1_1abstract__cooling__schedule.html">abstract_cooling_schedule</a> &amp;&#160;</td>
          <td class="paramname"><em>cs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>starting_temp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>stop_temp</em> = <code>1e-7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>K</em> = <code>1.0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a search by simulated annealing instance. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">working</td><td>The working solution (this will be modified during search).</td></tr>
    <tr><td class="paramname">recorder</td><td>A solution recorder (possibly holding a different solution instance) used to record the best solution found.</td></tr>
    <tr><td class="paramname">moveman</td><td>A problem specific implementation of the move_manager_type used to generate the neighborhood (the choice of the neighbourhood and its exploration greatly influences the algorithm quality and speed).</td></tr>
    <tr><td class="paramname">tc</td><td>The termination criteria used to terminate the search process, this is an extension to the standard Simulated Annealing: the algorithm terminates either when the termination criterion is met or when the temperature is &lt;= 0.</td></tr>
    <tr><td class="paramname">cs</td><td>The annealing schedule that will be used by the algorithm to regulate the temperature at each iteration (many have been proposed in literature and influence the quality and speed of the algorithm).</td></tr>
    <tr><td class="paramname">starting_temp</td><td>The starting SA temperature (this is an important parameter that depends on the problem and will influence the search quality and duration).</td></tr>
    <tr><td class="paramname">K</td><td>The "Boltzmann" constant that we want ot use (default is 1). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a3af70d63721cfb2a847c4e211283db06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3af70d63721cfb2a847c4e211283db06">&#9670;&nbsp;</a></span>cooling_schedule()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename move_manager_type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classmets_1_1abstract__cooling__schedule.html">abstract_cooling_schedule</a>&amp; <a class="el" href="classmets_1_1simulated__annealing.html">mets::simulated_annealing</a>&lt; move_manager_type &gt;::cooling_schedule </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The annealing schedule instance. </p>
<dl class="section return"><dt>返回</dt><dd>The cooling schedule used by this search process. </dd></dl>
<div class="fragment"><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    { <span class="keywordflow">return</span> cooling_schedule_m; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a5be9072d06636f667c6362760367682a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5be9072d06636f667c6362760367682a">&#9670;&nbsp;</a></span>current_temp()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename move_manager_type &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classmets_1_1simulated__annealing.html">mets::simulated_annealing</a>&lt; move_manager_type &gt;::current_temp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The current annealing temperature. </p>
<dl class="section return"><dt>返回</dt><dd>The current temperature of the algorithm. </dd></dl>
<div class="fragment"><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    { <span class="keywordflow">return</span> current_temp_m; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ac8303c4604e82f142cb888b02ba32048"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8303c4604e82f142cb888b02ba32048">&#9670;&nbsp;</a></span>search()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename move_manager_t &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classmets_1_1simulated__annealing.html">mets::simulated_annealing</a>&lt; move_manager_t &gt;::search</td>
        </tr>
        <tr>
          <td align="right">throw </td><td>(</td><td colspan="2"><a class="el" href="classmets_1_1no__moves__error.html">no_moves_error</a></td>
        </tr>
        <tr>
          <td align="right"></td><td>)</td><td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method starts the simulated annealing search process. </p>
<p>Remember that this is a minimization process. </p>

<p>实现了 <a class="el" href="classmets_1_1abstract__search.html#a9c57b09ce6efdb9c3dfc47bb1a38efe9">mets::abstract_search&lt; move_manager_type &gt;</a>.</p>
<div class="fragment"><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;{</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  <span class="keyword">typedef</span> abstract_search&lt;move_manager_t&gt; base_t;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  current_temp_m = starting_temp_m;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;  <span class="keywordflow">while</span>(!termination_criteria_m(base_t::working_solution_m) </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;        &amp;&amp; current_temp_m &gt; stop_temp_m)</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    {</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;      gol_type actual_cost = </div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="keyword">static_cast&lt;</span><a class="code" href="classmets_1_1evaluable__solution.html">mets::evaluable_solution</a>&amp;<span class="keyword">&gt;</span>(base_t::working_solution_m)</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    .cost_function();</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;      <span class="comment">/*gol_type best_cost =</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="comment">    static_cast&lt;mets::evaluable_solution&amp;&gt;(base_t::working_solution_m)</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="comment">    .cost_function();*/</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160; </div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;      base_t::moves_m.refresh(base_t::working_solution_m);</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;      <span class="keywordflow">for</span>(<span class="keyword">typename</span> move_manager_t::iterator movit = base_t::moves_m.begin(); </div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;          movit != base_t::moves_m.end(); ++movit)</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;      {</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        <span class="comment">// apply move and record proposed cost function</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        gol_type cost;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        <span class="keywordflow">if</span>(apply_and_evaluate) {</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;          cost = (*movit)-&gt;apply_and_evaluate(base_t::working_solution_m);</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;          cost = (*movit)-&gt;evaluate(base_t::working_solution_m);</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160; </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="keywordtype">double</span> delta = (<span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(cost-actual_cost));</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <span class="keywordflow">if</span>(delta &lt; 0 || gen() &lt; exp(-delta/(K_m*current_temp_m)))</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        {</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;          <span class="comment">// accepted: apply, record, exit for and lower temperature</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;          <span class="keywordflow">if</span>(!apply_and_evaluate)</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            (*movit)-&gt;apply(base_t::working_solution_m);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;          base_t::current_move_m = movit;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;          <span class="keywordflow">if</span>(base_t::solution_recorder_m.accept(base_t::working_solution_m))</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;          {</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            base_t::step_m = base_t::IMPROVEMENT_MADE;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;            this-&gt;<a class="code" href="classmets_1_1subject.html#a604a3c6cb19a470779170e29528f3e83">notify</a>();</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;          }</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;          base_t::step_m = base_t::MOVE_MADE;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;          this-&gt;<a class="code" href="classmets_1_1subject.html#a604a3c6cb19a470779170e29528f3e83">notify</a>();</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;          <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        }</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(apply_and_evaluate)</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        {</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;          (*movit)-&gt;unapply(base_t::working_solution_m);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;      } <span class="comment">// end for each move</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;      </div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;      current_temp_m = </div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;      cooling_schedule_m(current_temp_m, base_t::working_solution_m);</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    }</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;}</div>
<div class="ttc" id="aclassmets_1_1evaluable__solution_html"><div class="ttname"><a href="classmets_1_1evaluable__solution.html">mets::evaluable_solution</a></div><div class="ttdoc">A copyable and evaluable solution implementation,</div><div class="ttdef"><b>Definition:</b> model.hh:157</div></div>
<div class="ttc" id="aclassmets_1_1subject_html_a604a3c6cb19a470779170e29528f3e83"><div class="ttname"><a href="classmets_1_1subject.html#a604a3c6cb19a470779170e29528f3e83">mets::subject&lt; abstract_search&lt; move_manager_type &gt; &gt;::notify</a></div><div class="ttdeci">virtual void notify()</div><div class="ttdoc">Notify all attached observers.</div><div class="ttdef"><b>Definition:</b> observer.hh:161</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>recognition/include/pcl/recognition/3rdparty/metslib/<a class="el" href="simulated-annealing_8hh_source.html">simulated-annealing.hh</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>mets</b></li><li class="navelem"><a class="el" href="classmets_1_1simulated__annealing.html">simulated_annealing</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
